package com.umeng.p7qimokaoshi.Prensenter;

import com.example.mymvp.view.callback.BaseModelCallback;
import com.example.mymvp.view.presenter.BasePresenter;
import com.example.mymvp.view.ui.fragment.BaseMvpFramgent;
import com.umeng.p7qimokaoshi.Bean.DoemList;
import com.umeng.p7qimokaoshi.Bean.Dome;
import com.umeng.p7qimokaoshi.Molder.MainMolder;
import com.umeng.p7qimokaoshi.View.MianView;

import java.util.List;

public class MainPrensenter extends BasePresenter<MianView,MainMolder>implements BaseModelCallback<List<Dome.ListBean>,List<DoemList.ListBean>> {

    public void getData(){
        getModel().getData(this,getLifecleProvider());

        getModel().getData1(this,getLifecleProvider());
    }

    @Override
    public void onSucess(List<Dome.ListBean> list) {
        getmView().showList(list);
    }

    @Override
    public void onRecSucess(List<DoemList.ListBean> listBeans) {
        getmView().showRecList(listBeans);
    }

    @Override
    public void onError(String message, int code) {
        getmView().showError(message, code);
    }
}
